home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / menustuf.sit / Changes to SetDirectory script.txt < prev    next >
Text File  |  1990-04-16  |  2KB  |  45 lines

  1. File #1: TwoSquare:MPW:Scripts:SetDirectory
  2. File #2: MPW2:Scripts:SetDirectory
  3.  
  4. Nonmatching lines (File "TwoSquare:MPW:Scripts:SetDirectory"; Line 12:22; File "MPW2:Scripts:SetDirectory"; Line 12:14)
  5.   12    #
  6.   13    #  Modified by LDO 1989 March 8 to change text of first
  7.   14    #  item in Directory menu to track current directory.
  8.   15    #  Modified by LDO 1989 May 26 to avoid interpretation of
  9.   16    #  special characters in text of menu items.
  10.   17    #  Modified by LDO 1989 July 7 to avoid creation of duplicate
  11.   18    #  menu items.
  12.   19    #
  13.   20    
  14.   21    Set Exit 0
  15.   22    If {#} != 1  or  "{1}" == ""
  16.  
  17.   12    
  18.   13    Set Exit 0
  19.   14    If {#} != 1  OR  "{1}" == ""
  20.  
  21.  
  22. Nonmatching lines (File "TwoSquare:MPW:Scripts:SetDirectory"; Line 29:43; File "MPW2:Scripts:SetDirectory"; Line 21:24)
  23.   29       If `FindMenuItem Directory "{Directory}"` == 0
  24.   30    #     Note: AddMenu checks for an existing menu item with the specified
  25.   31    #     text before adding a new one. For this reason, I must change item
  26.   32    #     1 of the Directory menu to something that isn't going to match the
  27.   33    #     new current directory *before* calling AddMenu, and change it to the
  28.   34    #     new directory afterwards.
  29.   35          SetMenu Directory 1 'Show Directory'
  30.   36          AddMenu Directory "New Directory" ╢
  31.   37             '(Directory "'"{directory}"'"; SetMenu Directory 1 "'"{directory}"'") ╢
  32.   38                > "{ShellDirectory}"MPW.Errors │ Dev:StdOut ╢
  33.   39                || Alert < "{ShellDirectory}"MPW.Errors'
  34.   40          SetMenu Directory `FindMenuItem Directory "New Directory"` "{Directory}"
  35.   41       End # If
  36.   42       SetMenu Directory 1 "{Directory}"
  37.   43    End # If
  38.  
  39.   21       AddMenu Directory "{directory}" ╢
  40.   22          'Directory "'"{directory}"'" > "{ShellDirectory}"MPW.Errors │ Dev:StdOut ╢
  41.   23            || Alert < "{ShellDirectory}"MPW.Errors'
  42.   24    End
  43.  
  44. *** EOF on both files ***
  45.